{extend name="public/base" /}
{block name="title"}
<title>{:confv('title')}</title>
<meta name="keywords" content="{:confv('keywords')}">
<meta name="description" content="{:confv('description')}">
{/block}
{block name="head"}
<link href="__ROOT__/home/AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css" />
<link href="__ROOT__/home/AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css" />
<link href="__ROOT__/home/basic/css/demo.css" rel="stylesheet" type="text/css" />
<link type="text/css" href="__ROOT__/home/css/optstyle.css" rel="stylesheet" />
<link type="text/css" href="__ROOT__/home/css/style.css" rel="stylesheet" />

<script type="text/javascript" src="__ROOT__/home/basic/js/jquery-1.7.min.js"></script>
<script type="text/javascript" src="__ROOT__/home/basic/js/quick_links.js"></script>

<script type="text/javascript" src="__ROOT__/home/AmazeUI-2.4.2/assets/js/amazeui.js"></script>
<script type="text/javascript" src="__ROOT__/home/js/jquery.imagezoom.min.js"></script>
<script type="text/javascript" src="__ROOT__/home/js/jquery.flexslider.js"></script>
<script type="text/javascript" src="__ROOT__/home/js/list.js"></script>
<script src="__ROOT__/home/js/layer/layer.js"></script>
{/block}
{block name="body"}
			<!--悬浮搜索框-->

			<div class="clear"></div>
            <!-- <b class="line"></b> -->
			<div class="listMain">

				<!--分类-->
			<div class="nav-table">
					   <div class="long-title"><span class="all-goods">全部分类</span></div>
					   <div class="nav-cont">
							<ul>
								{foreach $cates as $vo}
                                    <li class="qc"><a href="{:url('/'.$vo['id'])}">{$vo.typename}</a></li>
							    {/foreach}
							</ul>
						</div>
			</div>
				<ol class="am-breadcrumb am-breadcrumb-slash">
					<li><a href="{:url('/')}">产品</a></li>
					<li><a href="javascript:;">{$cate_name}</a></li>
					<li class="am-active">{$product.title}</li>
				</ol>

				<div class="scoll">
					<section class="slider">
						<div class="flexslider">
							<ul class="slides">
								<li>
									<img src="__ROOT__/home/images/01.jpg" title="pic" />
								</li>
								<li>
									<img src="__ROOT__/home/images/02.jpg" />
								</li>
								<li>
									<img src="__ROOT__/home/images/03.jpg" />
								</li>
							</ul>
						</div>
					</section>
				</div>

				<!--放大镜-->

				<div class="item-inform">
					<div class="clearfixLeft" id="clearcontent">

						<div class="box">
							<div class="tb-booth tb-pic tb-s310">
								<a href="{$product.litpic|default='__ROOT__/home/images/imgsearch1.jpg'}"><img src="{$product.litpic|default='__ROOT__/home/images/imgsearch1.jpg'}" alt="细节展示放大镜特效" rel="{$product.litpic|default='__ROOT__/home/images/imgsearch1.jpg'}" class="jqzoom" /></a>
							</div>

						</div>

						<div class="clear"></div>
					</div>

					<div class="clearfixRight">

						<!--规格属性-->
						<!--名称-->
						<div class="tb-detail-hd">
							<h1>{$product.title}</h1>
						</div>
						<div class="tb-detail-list">
							<!--价格-->
							<div class="tb-detail-price">
								<li class="price iteminfo_price">
									<dt>价格</dt>
									<dd><em>¥</em><b class="sys_item_price">{$product.price}</b>  </dd>                                 
								</li>
								<div class="clear"></div>
							</div>

							<!--地址-->
							<dl class="iteminfo_parameter freight">
			
							</dl>
							<div class="clear"></div>

							<!--销量-->
							<ul class="tm-ind-panel">
							</ul>
							<div class="clear"></div>

							<!--各种规格-->
							
							<div class="clear"></div>
							<!--活动	-->
							<div class="shopPromotion gold">
								<div class="hot">
									<dt class="tb-metatit">说明</dt>
									<div class="gold-list">
										<p>{$product.description|default="暂无说明"}
										<!-- <span>点击领券<i class="am-icon-sort-down"></i></span> -->
										</p>
									</div>
								</div>
								<div class="clear"></div>
								<div class="hot">
									<dt class="tb-metatit">操作师</dt>
									<div class="gold-list">
										<p>{$product.operation|default="暂无操作师"}
										<!-- <span>点击领券<i class="am-icon-sort-down"></i></span> -->
										</p>
									</div>
								</div>

								<div class="clear"></div>
								<div class="hot">
									<dt class="tb-metatit">助理</dt>
									<div class="gold-list">
										<p>{$product.assistant|default="暂无助理"}
										<!-- <span>点击领券<i class="am-icon-sort-down"></i></span> -->
										</p>
									</div>
								</div>

								<div class="clear"></div>
								<div class="hot">
									<dt class="tb-metatit">销量</dt>
									<div class="gold-list">
										<p>{$product.volume|default="0"}
										<!-- <span>点击领券<i class="am-icon-sort-down"></i></span> -->
										</p>
									</div>
								</div>

								<div class="clear"></div>

								<div class="clear"></div>
								<div class="hot">
									<dt class="tb-metatit">数量</dt>
									<div class="gold-list">
										<input id="min" class="am-btn am-btn-default" name="" type="button" value="-" />
										<input id="text_box" name="" type="text" value="1" style="width:30px;" />
										<input id="add" class="am-btn am-btn-default" name="" type="button" value="+" />
										<span id="Stock" class="tb-hidden"><span class="stock"></span></span>
									</div>
								</div>

								<div class="clear"></div>
								<div class="hot">
									<dt class="tb-metatit"></dt>
									<div class="gold-list">
										<div class="clearfix tb-btn  theme-login">
											<a id="LikBuy" title="点此按钮到下一步确认购买信息" href="javascript:;">立即购买</a>
										</div>
									</div>
								</div>

								<div class="clear"></div>
							</div>
						</div>

						<div class="pay">
						</div>

					</div>

					<div class="clear"></div>

				</div>
				<div class="clear"></div>
				
							
				<!-- introduce-->

				<div class="introduce">
					<div class="browse">
					    <div class="mc"> 
						     <ul>					    
						     	<div class="mt">            
						            <h2>其他产品</h2>        
					            </div>
						     	{foreach $abouts as $vo}
							      <li class="first">
							      	<div class="p-img">                    
							      		<a  href="{:url('/detail/'.$vo['id'])}"> <img class="" src="{$vo.litpic|default='__ROOT__/home/images/imgsearch1.jpg'}"> </a>               
							      	</div>
							      	<div class="p-name"><a href="{:url('/detail/'.$vo['id'])}">
							      		{$vo.title}
							      	</a>
							      	</div>
							      	<div class="p-price"><strong>￥{$vo.price}</strong></div>
							      </li>
							    {/foreach}					      
					      
						     </ul>					
					    </div>
					</div>
					<div class="introduceMain">
						<div class="am-tabs" data-am-tabs>
							<ul class="am-avg-sm-3 am-tabs-nav am-nav am-nav-tabs">
								<li class="am-active">
									<a href="javascript:;">

										<span class="index-needs-dt-txt">宝贝详情</span></a>

								</li>


							</ul>

							<div class="am-tabs-bd">

								<div class="am-tab-panel am-fade am-in am-active">
								{:htmlspecialchars_decode($product['content'])}
									
									<div class="clear"></div>

								</div>

								<div class="am-tab-panel am-fade">

									<div class="tb-reviewsft">
										<div class="tb-rate-alert type-attention">购买前请查看该商品的 <a href="#" target="_blank">购物保障</a>，明确您的售后保障权益。</div>
									</div>

								</div>

							

							</div>

						</div>

						<div class="clear"></div>

						{block name="foot"}{include file="public/footer" /}{/block}
					</div>

				</div>
			</div>
<script type="text/javascript">

$('#LikBuy').click(function(){
	var uid = "{:session('user.id')}";
	if (!uid) {
		layer.msg('请先登录');
	}
	var number = $('#text_box').val();
	var pid = '{$product.id}';
	$.post('{:url('/addorder')}',{number:number,pid:pid},function(data){
        if (data==-1) {
        	layer.msg('购买失败');
        }else{
            window.location.href= '/order/'+data+'.html';
        }
	})
})
</script>
{/block}
